<?php

class predicate {
	protected $l, $r;
	protected $op;

	function __construct($left, $operator, $right) {
		$this->l = $left;
		$this->r = $right;
		$this->op = $operator;
	}

	public function toSQL($model) {
		return '`'.$this->l.'` '.$this->op.' '.$model->serialize($model->getType($this->l), new data($this->r)); 
	}
}

?>
